<?php #//AJAX PHP PENNY AUCTION v.1.1

#///////////////////////////////////////////////////////////
#//  COPYRIGHT 2009 Aaron Helmlinger ALL RIGHTS RESERVED  //
#///////////////////////////////////////////////////////////
?>
<?


?>
<!-- TABLE WITH AUCTIONS -->
<BR>
<table width="95%" border=0 cellpadding=4 cellspacing=1 align=center>
<TR>
<TD>
<FIELDSET><LEGEND>

<span class=PAGE_HEADER >&nbsp;Auction Payment (Checkout)&nbsp;</span>
</LEGEND>
                                   <center>
<span class=BOLDTEXT> <FONT size=+2><? print $item_name; ?></FONT><BR> </SPAN> 
<FONT size=-1 COLOR=#555555>  <? print $item_number; ?></FONT><BR><br>
Auction Final Value: <? print $currency_symbol; print print_money_nosymbol($price); ?><BR>
Postage & Handling:&nbsp;<? print $currency_symbol; print print_money_nosymbol($shipping_fee); ?><BR><BR>
<FONT size=+1 color=red> <span class=BOLDTEXT> Amount Due: <? print $currency_symbol; $price2 = $price + $shipping_fee; print print_money_nosymbol($price2); print " ".$currency; ?><BR><BR></SPAN> </FONT>
  
   <? 
  
       if($PHPAUCTION_TESTMODE == "no") {
         // THIS SETTING IS SET IN includes/config.inc.php
        // THIS SHOWS IF PAYPAL TEST MODE IS OFF
        
        ?>
              <form action="https://www.paypal.com/cgi-bin/webscr" method="post">        	
          <? } ?>
    <?    
        // THIS SHOWS IF PAYPAL TEST MODE IS ON
        // YOU NEED TO SETUP A PAYPAL TEST ACCOUNT AT https://developer.paypal.com/ 
             
           if($PHPAUCTION_TESTMODE == "yes") {  

        ?>

        <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
 
  <? } ?>
 
  
						<input type="hidden" name="cmd" value="_xclick">
						<input type="hidden" name="item_name" value="Payment for <? print $SETTINGS['sitename']; ?> Auction: <? print $item_name; ?>">
						<input type="hidden" name="item_number" value="<? print $item_number; ?>">
						<input type="hidden" name="amount" value="<? print $price2; ?>">
						<input type="hidden" name="currency_code" value="<? print $currency; ?>">
					
           <? if($auction_id) { ?>     
          	 <input type="hidden" name="return" value="<?=$SETTINGS['siteurl']?>item.php?id=<? print $auction_id; ?>">
					   <? } ?>
					   
					   <? if(!$auction_id) { ?>     
          	 <input type="hidden" name="return" value="<?=$SETTINGS['siteurl']?>index.php">
					   <? } ?>
          
       <? if($auction_id) { ?>    
          	<input type="hidden" name="cancel_return" value="<?=$SETTINGS['siteurl']?>item.php?id=<? print $auction_id; ?>">
						   <? } ?>
               
               <? if(!$auction_id) { ?>    
          	<input type="hidden" name="cancel_return" value="<?=$SETTINGS['siteurl']?>index.php">
						   <? } ?>          
						   
                                 <? //  <!--------- The Paypal account is the email enter for the first user id#1 -->  ?>
            
        <? 
  
       if($PHPAUCTION_TESTMODE == "no") {
         // THIS SETTING IS SET IN includes/config.inc.php
        // THIS SHOWS IF PAYPAL TEST MODE IS OFF
        
        ?>     
            <input type="hidden" name="business" value="<? print $paypal_email; ?>">
				 <? } ?>
         
       <?  if($PHPAUCTION_TESTMODE == "yes") {  

        ?>  	     TEST MODE   <input type="hidden" name="business" value="<? print $TEST_PAYPAL_EMAIL; ?>">  
          	
         	 <? } ?> 	
          
          	<input type="hidden" name="no_shipping" value="1">
						<input type="hidden" name="no_note" value="0">
						
			
            <? 
       if($PHPAUCTION_TESTMODE == "no") {
         // THIS SETTING IS SET IN includes/config.inc.php
        // THIS SHOWS IF PAYPAL TEST MODE IS OFF
        
        ?>     
           <input type="hidden" name="notify_url" value="<?=$SETTINGS['siteurl']?>ipn_auction.php">
				 <? } ?>
         
       <?  if($PHPAUCTION_TESTMODE == "yes") {  

        ?>    <input type="hidden" name="notify_url" value="<?=$SETTINGS['siteurl']?>ipn_auction_testmode.php">  
          	
         	 <? } ?> 	
            			
						
						
						
						
												<input type="submit" name="submit" value=" Purchase with Paypal " class=inputbutton>
					</form>
                                 
                      <? if($auction_id) { ?>   
                                 
                    <FONT size=-1> <span class=BOLDTEXT> <A HREF="item.php?id=<? print $auction_id; ?>">CANCEL PURCHASE</A></SPAN> </FONT>              
                                 
                         <? } ?>
                         
                              <? if(!$auction_id) { ?>   
                                 
                    <FONT size=-1> <span class=BOLDTEXT> <A HREF="index.php">CANCEL PURCHASE</A></SPAN> </FONT>              
                                 
                         <? } ?>              
                                              </center>

</FIELDSET>
</TD>
</TR>
</TABLE>
<P>      <TABLE WIDTH=94% ALIGN=center>
                                               <TR>
                                               <TD>
     <FONT size=-1><CENTER><span class=BOLDTEXT> WE USE PAYPAL </span> For Visa, Mastercard, American Express, Discover And Bank ACH Payment Transactions. </CENTER>  <BR>   
                                                 </FONT>
                                        
                </TD>
               </TR>
               </TABLE>
   
    
     <TABLE WIDTH=94% ALIGN=center>
                                               <TR>
                                               <TD>
                                               
                                               
                                               <!-- PayPal Logo --><table border="0" cellpadding="0" cellspacing="0" align="center"><tr><td align="center"></td></tr>
<tr><td align="center"><a href="#" onclick="javascript:window.open('https://www.paypal.com/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=350');"><img  src="https://www.paypal.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif" border="0" alt="Solution Graphics"></a></td></tr></table><!-- PayPal Logo -->
      </TD><TD>
     <FONT size=-1 color=#666666>                                                                                                                                                                                                                                                                                                                                                                                                                                          
                Paypal Is The Leading Online Payments                                                                                                                                                                                                                                                                                                                                                                                                            
                Company, Owned And Operated By Ebay.
PayPal Has Over 153 Million Users.
Rest Assured, Your Private And Payment
Information Is In Good Hands, Safe And Secure.        </FONT>
               </TD>
               </TR>
               </TABLE>
   